import { http } from "@/utils/http"
import type { BannerItem,CategoryMutliItem,GuessItem,HotItem } from "@/types/home"
import type { PageParams, PageResult } from "@/types/global"

/*
  获取首页轮播图
  distributionSite 轮播图位置 1-首页
*/
export const getHomeBannerAPI = (distributionSite = 1) => {
  return http<BannerItem[]>({
        url: '/home/banner',
        method: 'GET',
        data: {
            distributionSite
        }
    })
}

/*
首页菜单栏
*/ 
export const getHomeCategoryMutliAPI = () => {
  return http<CategoryMutliItem[]>({
        url: '/home/category/mutli',
        method: 'GET',
    });
}

/*
热门推荐
*/
export const getHomeHotMutliAPI = () => {
   return http<HotItem[]>({
        url: '/home/hot/mutli',
        method: 'GET',
    });
}

/*
猜你喜欢
*/
export const getHomeGoodsGuessLikeAPI = (data?:PageParams) => {
return http<PageResult<GuessItem>>({
        url: '/home/goods/guessLike',
        method: 'GET',
        data
    });
}